package com.nariano.server.services.userservice;

import java.util.List;

import com.nariano.server.domain.entities.User;
import com.nariano.server.utils.aop.rwsemaphore.ReadTransaction;
import com.nariano.server.utils.aop.rwsemaphore.WriteTransaction;


public interface UserService {
	
	@ReadTransaction
    int getNofUsers();
    
	@ReadTransaction
    List<User> getAllUsers();
    
	@ReadTransaction
    User findUserFromUserName(String userName);
    
	@ReadTransaction
    User findUserFromEmail(String email);
    
	@WriteTransaction
    User insertUser(User user);
    
	@WriteTransaction
    void updateUser(User user);
    
	@WriteTransaction
    void deleteUser(User user);

	@ReadTransaction
	User findUserFromId(Integer id);

	@ReadTransaction
	List<User> findAttackers(Integer id);
}
